<?php

if (!defined( 'BASEPATH')) exit('No direct script access allowed'); 

class Home {
	
	private $ci;
	
	public function __construct(){		
		$this->ci =& get_instance();
		!$this->ci->load->library('session') ? $this->ci->load->library('session') : false;
		!$this->ci->load->helper('url') ? $this->ci->load->helper('url') : false;
	}

	public function check_login(){
		if($this->ci->session->userdata('logged_in') == false && $this->ci->uri->segment(1) != 'login' && $this->ci->uri->segment(1) != 'verifica_login' && $this->ci->uri->segment(1) != 'principal' && $this->ci->uri->segment(1) != 'cliente_afuera' && $this->ci->uri->segment(1) != 'proveedor_afuera'){
			redirect(base_url('index.php/login'));
		}
	}
}
/*
/end hooks/home.php
*/